﻿//Created by Action Script Viewer - http://www.buraks.com/asv
package reprise.css.math {

    public class CSSCalculationBinding extends AbstractCSSCalculation {

        protected var m_selector:String;
        protected var m_property:String;
        protected var m_value:String;

        public function CSSCalculationBinding(_arg1:String){
            var _local3:String;
            var _local4:int;
            super();
            m_value = _arg1;
            _arg1 = _arg1.substring(2, (_arg1.length - 2));
            var _local2:Array = _arg1.split(",");
            if (_local2.length == 1){
                m_selector = "";
                m_property = _local2[0];
            } else {
                _local3 = _local2[0];
                _local4 = _local3.lastIndexOf("#");
                if (_local4 > -1){
                    _local3 = _local3.substr(_local4);
                };
                m_selector = _local3;
                m_property = _local2[1];
            };
        }
        public function toString():String{
            return (("CSSCalculationBinding, value: " + m_value));
        }
        override public function resolve(_arg1:Number, _arg2:ICSSCalculationContext=null):Number{
            return (_arg2.valueBySelectorProperty(m_selector, m_property));
        }

    }
}//package reprise.css.math 
